<script type="text/javascript">
$(function(){
	var pg = App.demo.feeApplyForm.ui, pp = pg.params;
	
	pg.seek('ok').click(function(){
		var a = pg.seek('amount').val();
		if (a) {
			$.post(App.ctx + '/fee/apply/submit.do', {
				id: pp.id,
				amount: a * 1
			}, function(rs){
				var ro = mac.eval(rs);
				if (ro.success) {
					pg.callback();
					pg.close();
					mac.alert('费用申请已提交，请等待审批');
				}
			});
		} else {
			mac.alert('请正确填写申请金额');
		}
		return false;
	});
});
</script>
<div class="form">
	<div class="item">
		<div class="label">申请金额：</div>
		<input type="number" name="amount" />
		<div class="clear"></div>
	</div>
	<div class="bottom">
		<button name="ok">确定</button>
	</div>
</div>